package cn.tedu.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * 远程调用账户服务
 * @author 郭鲁政
 */
@FeignClient(name = "account")
public interface AccountClient {
    /**
     * 远程调用账户服务
     * @param userId 用户id
     * @param money 订单金额
     * @return
     */
    @GetMapping("decrease")
    String decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
